import java.io.IOException;

import org.python.core.Py;
import org.python.core.PySystemState;
import org.python.util.PythonInterpreter;

/* 测试用的py文件都搬到本工程文件夹中了, 没有在F:/ */

public class JythonTest27 {
    public static void main(String[] args) throws IOException, InterruptedException {
        PySystemState ps = Py.getSystemState();
        ps.path.add("C:\\jython2.7b1\\Lib");
        ps.path.add("C:\\Python27\\Lib\\site-packages");
        
        PythonInterpreter pyTransfer = new PythonInterpreter();
        pyTransfer.execfile("F:/mytest.py");
        
        
/*        Process pr = Runtime.getRuntime().exec("python F:/123.py shuoGG");
        BufferedReader in = new BufferedReader(new InputStreamReader(pr.getInputStream()));
        String execResultStr;
        while( (execResultStr = in.readLine()) != null) //读取控制台的输出
            System.out.println(execResultStr);
        in.close();
        pr.waitFor();
        in.close();*/
    }
}
